<!DOCTYPE html>
<html lang="en">
<head>
    <title>Login</title>
    <meta charset="UTF-8">
    <#include "styleandscript.ftl"/>
</head>
<body>
<#import "/spring.ftl" as spring/>
<form action="/user/login" method="post">
    <div style="width: auto; margin-left: auto; margin-right: auto;">
        <div style="width: 200px; margin-left: auto; margin-right: auto; margin-top: 100px;">
            <@spring.bind "user.name"/>
            <input id="name" type="text" placeholder="账号" name="name" class="form-control" <#if user.name??>value="${user.name}"</#if>/>
            <span class="input-error"><@spring.showErrors ""/></span>
        </div>
        <div style="width: 200px; margin-left: auto; margin-right: auto; margin-top: 16px;">
            <@spring.bind "user.pwd"/>
            <input id="pwd" placeholder="密码" type="password" name="pwd" class="form-control" <#if user.pwd??>value="${user.pwd}"</#if>/>
            <span class="input-error"><@spring.showErrors ""/>${message!}</span>
        </div>
        <div style="width: 200px; margin-left: auto; margin-right: auto; margin-top: 16px;">
            <input  style="width: 100%; margin-left: auto; margin-right: auto;" class="btn btn-primary" type="submit" value="登录"/>
        </div>
        <div style="width: 200px; margin-left: auto; margin-right: auto; margin-top: 16px;">
            <input  style="width: 100%; margin-left: auto; margin-right: auto;" class="btn btn-primary" type="button" onclick="window.location='/user/register'" value="注册"/>
        </div>
    </div>
</form>
</body>
</html>